import {reqLogin, req} from '@/api/basicReq'

// 用户登录

export function userlogin(data = {}) {
    return reqLogin({
      url: 'user/UserLogin',
      method: "post",
      data: data
    })
  }

  // 用户登出

export function userlogout(data = {}) {
  return req({
    url: 'user/UserLogout',
    method: "post",
    data: data
  })
}


  // 获取房间列表
export function getRooms(data = {}) {
    return req({
      url: 'room/RoomMaster',
      method: "get",
      params: data
    })
  }
  // 新增房间
  export function addRoom(data = {}) {
    return req({
      url: 'room/RoomMaster',
      method: "post",
      data: data
    })
  }




// 获取楼层列表
export function getfloor(data = {}) {
return req({
    url: 'room/RoomFloor',
    method: "get",
    params: data
})
}

// 获取房间类型
export function getRoomType(data = {}) {
    return req({
        url: 'room/RoomType',
        method: "get",
        params: data
    })
    }


// 获取设备
export function getDevice(data = {}) {
  return req({
      url: 'device/Device',
      method: "get",
      params: data
  })
  }

// 获取设备类型
export function getDeviceType(data = {}) {
return req({
    url: 'device/DeviceType',
    method: "get",
    params: data
})
}


// 获取设备告警
export function getAlarm(data = {}) {
  return req({
      url: 'device/Alarm',
      method: "get",
      params: data
  })
  }

// 获取设备统计
export function DeviceCount(data = {}) {
  return req({
      url: 'device/GetDeviceCount',
      method: "get",
      params: data
  })
  }

// 首页获取房间
export function GetRoom(data = {}) {
  return req({
      url: 'room/GetRooms',
      method: "get",
      params: data
  })
  }

  // 首页获取房间
export function GetRoomDevice(data = {}) {
  return req({
      url: 'device/GetRoomDevice',
      method: "get",
      params: data
  })
  }

// 用户列表

export function UserList(data = {}) {
  return req({
    url: 'user/UserList',
    method: "get",
    params: data
  })
}

// 用户信息

export function UserInfo(data = {}) {
  return req({
    url: 'user/UserInfo',
    method: "get",
    params: data
  })
}

// 获取日志
export function LogList(data = {}) {
  return req({
    url: 'logs/LogList',
    method: "get",
    params: data
  })
}
  